#include "AlgoEvaluatorModule2Turbulence.h"

class algo::AlgoEvaluatorModule2TurbulencePrivate 
{
public:
};

algo::AlgoEvaluatorModule2Turbulence::AlgoEvaluatorModule2Turbulence()
	: d(new AlgoEvaluatorModule2TurbulencePrivate)
{
}

algo::AlgoEvaluatorModule2Turbulence::~AlgoEvaluatorModule2Turbulence()
{
	delete d;
}

std::vector<algobase::EvaluateEnvirDataType> algo::AlgoEvaluatorModule2Turbulence::getNeedType()
{
	return std::vector<algobase::EvaluateEnvirDataType>({ algobase::EEDT_CS_UO, algobase::EEDT_CS_VO });
}

int algo::AlgoEvaluatorModule2Turbulence::exec(
	const algobase::Path& path, 
	double& result, 
	algobase::EvaluateModuleCoords& indexCoords)
{
	auto db = getDB();

	if (!db) {
		setErrorMessage("DB Nullptr");
		return -1;
	}

	auto task_config = getTaskConfig();
	auto start_time = task_config.mStartTime;
	auto end_time = task_config.mEndTime;

	for (const auto& loop_coordZ : path) 
	{
		auto uo = db->getData(algobase::EEDT_CS_UO, start_time, loop_coordZ.mCoordZ);
		auto vo = db->getData(algobase::EEDT_CS_VO, start_time, loop_coordZ.mCoordZ);
	}

	return algo::AlgoEvaluatorModuleBase::exec(path, result, indexCoords);
}

double algo::AlgoEvaluatorModule2Turbulence::calcScore(double rawValue) const
{
	return getWeight();
}

double algo::AlgoEvaluatorModule2Turbulence::calcRaw(const std::vector<double>& rawValues) const
{
	return 0.0;
}
